PRESET Statement ---------------------------------------------------------------------------- Action Draws a specified point on the screen. Syntax PRESET STEP( x%, y%) , color& Remarks The following list describes the parts of the PRESET statement. ----------------------------------------------------------------------------- Part Description ---------------------------------------------------------------------------- STEP Indicates that x% and yc% are relative, not absolute. The coordinates are treated as distances from the most recent graphics cursor location, not distances from the (0,0) screen coordinate. For example, if the most recent graphics cursor location were Part Description ---------------------------------------------------------------------------- graphics cursor location were (10,10), PRESET STEP (10,5) would draw a point at (20,15). x% The x coordinate of the pixel that is to be set. y% The y coordinate of the pixel that is to be set. color& The color attribute for the specified pixel. The valid range of screen coordinate values and color values depends on the screen mode established by the most recently executed SCREEN statement. If a coordinate is outside the current viewport, no action is taken, nor is an error message generated. If you use PRESET without color&, the background color is selected. In contrast, if you use PSET without color&, the foreground color is selected. Otherwise, the two statements work exactly the same. See Also PSET Example The following example uses PSET and PRESET to draw a line 20 pixels long, then move the line across the screen from left to right. SCREEN 1 . COLOR 1,1 . CLS FOR I = 0 TO 299 STEP 3 FOR J = I TO 20 + I PSET (J, 50), 2' Draw the line in new location. NEXT FOR J = I TO 20 + I PRESET (J, 50) ' Erase the line. NEXT NEXT